package mysql

import "github.com/zeromicro/go-zero/core/stores/sqlx"

var _ ExceptNewsModel = (*customExceptNewsModel)(nil)

type (
	// ExceptNewsModel is an interface to be customized, add more methods here,
	// and implement the added methods in customExceptNewsModel.
	ExceptNewsModel interface {
		exceptNewsModel
		withSession(session sqlx.Session) ExceptNewsModel
	}

	customExceptNewsModel struct {
		*defaultExceptNewsModel
	}
)

// NewExceptNewsModel returns a model for the database table.
func NewExceptNewsModel(conn sqlx.SqlConn) ExceptNewsModel {
	return &customExceptNewsModel{
		defaultExceptNewsModel: newExceptNewsModel(conn),
	}
}

func (m *customExceptNewsModel) withSession(session sqlx.Session) ExceptNewsModel {
	return NewExceptNewsModel(sqlx.NewSqlConnFromSession(session))
}
